# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AndroidPublisher.V3.Model.DeviceMetadata do
  @moduledoc """
  Characteristics of the user's device.

  ## Attributes

  *   `cpuMake` (*type:* `String.t`, *default:* `nil`) - Device CPU make, e.g. "Qualcomm"
  *   `cpuModel` (*type:* `String.t`, *default:* `nil`) - Device CPU model, e.g. "MSM8974"
  *   `deviceClass` (*type:* `String.t`, *default:* `nil`) - Device class (e.g. tablet)
  *   `glEsVersion` (*type:* `integer()`, *default:* `nil`) - OpenGL version
  *   `manufacturer` (*type:* `String.t`, *default:* `nil`) - Device manufacturer (e.g. Motorola)
  *   `nativePlatform` (*type:* `String.t`, *default:* `nil`) - Comma separated list of native platforms (e.g. "arm", "arm7")
  *   `productName` (*type:* `String.t`, *default:* `nil`) - Device model name (e.g. Droid)
  *   `ramMb` (*type:* `integer()`, *default:* `nil`) - Device RAM in Megabytes, e.g. "2048"
  *   `screenDensityDpi` (*type:* `integer()`, *default:* `nil`) - Screen density in DPI
  *   `screenHeightPx` (*type:* `integer()`, *default:* `nil`) - Screen height in pixels
  *   `screenWidthPx` (*type:* `integer()`, *default:* `nil`) - Screen width in pixels
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cpuMake => String.t() | nil,
          :cpuModel => String.t() | nil,
          :deviceClass => String.t() | nil,
          :glEsVersion => integer() | nil,
          :manufacturer => String.t() | nil,
          :nativePlatform => String.t() | nil,
          :productName => String.t() | nil,
          :ramMb => integer() | nil,
          :screenDensityDpi => integer() | nil,
          :screenHeightPx => integer() | nil,
          :screenWidthPx => integer() | nil
        }

  field(:cpuMake)
  field(:cpuModel)
  field(:deviceClass)
  field(:glEsVersion)
  field(:manufacturer)
  field(:nativePlatform)
  field(:productName)
  field(:ramMb)
  field(:screenDensityDpi)
  field(:screenHeightPx)
  field(:screenWidthPx)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidPublisher.V3.Model.DeviceMetadata do
  def decode(value, options) do
    GoogleApi.AndroidPublisher.V3.Model.DeviceMetadata.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AndroidPublisher.V3.Model.DeviceMetadata do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
